<!-- 招商活动 -->

<script setup lang="ts">
import ApiActivity from "@/api/activity";
import BySpin from "@/components/ui/BySpin.vue";
import { TActivity } from "@/global";
import useList from "@/hooks/useList";
import ActivitiCard from "@/pages/index/components/ActivitiCard.vue";

defineProps<{
  merchant?: number;
}>();

const { list, loading } = useList<TActivity>(ApiActivity.activityList);
</script>

<template>
  <ActivitiCard
    v-for="item in list"
    :key="item.id"
    :merchant="merchant"
    class="mb-3"
    :source="item"
  />

  <BySpin v-if="loading" />
</template>
